import { getItem, setItem } from '@/utils/storage';

const TOKEN_STORAGE_KEY = 'MY_APP_ACCESS_TOKEN_V1';

const getToken = (): string | null => {
  return getItem(TOKEN_STORAGE_KEY);
};

const setToken = (token: string): boolean => {
  return setItem(TOKEN_STORAGE_KEY, token);
};

const removeToken = (): void => {
  return localStorage.removeItem(TOKEN_STORAGE_KEY);
};

export { getToken, removeToken, setToken, TOKEN_STORAGE_KEY };
